There's a huge difference between one individual choosing not to associate with another individual vs. a whole group of people being forced not to associate with that individual.
There's a huge difference between not hanging out with someone because you don't want to vs. not hanging out with someone because you're afraid of being shunned too.
There's a huge difference between being genuinely offended by a persons actions committed against you or your family and choosing not to speak to that person vs. not knowing a person's motives or actions and being told to shun them anyway.
There's a difference between avoiding someone out of legitimate safety concerns vs. blackballing someone for imagined or arbitrary crimes.
Shunning by itself isn't "good" or "bad". It's the motives behind the action and how that action affects well-being/unnecessary-harm that determines if shunning is good or bad.